home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / xmcd-1.4 / libdi.d / os_linux.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-10  |  2.1 KB  |  64 lines

  1. /*
  2.  *   libdi - CD Audio Player Device Interface Library
  3.  *
  4.  *   Copyright (C) 1995  Ti Kan
  5.  *   E-mail: ti@amb.org
  6.  *
  7.  *   This program is free software; you can redistribute it and/or modify
  8.  *   it under the terms of the GNU General Public License as published by
  9.  *   the Free Software Foundation; either version 2 of the License, or
  10.  *   (at your option) any later version.
  11.  *
  12.  *   This program is distributed in the hope that it will be useful,
  13.  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  *   GNU General Public License for more details.
  16.  *
  17.  *   You should have received a copy of the GNU General Public License
  18.  *   along with this program; if not, write to the Free Software
  19.  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  *
  21.  *   This software module contains code that interfaces the CD player
  22.  *   application to the Linux operating system.
  23.  */
  24. #ifndef __OS_LINUX_H__
  25. #define __OS_LINUX_H__
  26.  
  27. #if defined(linux) && defined(DI_SCSIPT) && !defined(DEMO_ONLY)
  28.  
  29. #ifndef LINT
  30. static char *_os_linux_h_ident_ = "@(#)os_linux.h    5.5 94/12/28";
  31. #endif
  32.  
  33.  
  34. /* Command result word - these should be in a system header file
  35.  * that a user program can include, but they aren't.
  36.  */
  37. #define status_byte(result)        (((result) >> 1) & 0xf)
  38. #define msg_byte(result)        (((result) >> 8) & 0xff)
  39. #define host_byte(result)        (((result) >> 16) & 0xff)
  40. #define driver_byte(result)        (((result) >> 24) & 0xff)
  41.  
  42. /* Linux SCSI ioctl commands - these should be in a system header file
  43.  * that a user program can include, but they aren't.
  44.  */
  45. #define SCSI_IOCTL_SEND_COMMAND        1
  46. #define SCSI_IOCTL_TEST_UNIT_READY    2
  47.  
  48.  
  49. #define OS_MODULE    /* Indicate that this is compiled on a supported OS */
  50. #define SETUID_ROOT    /* Setuid root privilege is required */
  51.  
  52.  
  53. /* Public function prototypes */
  54. extern bool_t    pthru_send(byte_t, word32_t, byte_t *, word32_t, byte_t,
  55.             word32_t, byte_t, byte_t, byte_t, bool_t);
  56. extern bool_t    pthru_open(char *);
  57. extern void    pthru_close(void);
  58. extern char    *pthru_vers(void);
  59.  
  60. #endif    /* linux DI_SCSIPT DEMO_ONLY */
  61.  
  62. #endif    /* __OS_LINUX_H__ */
  63.  
  64.